package com.summer.data.table.column;

import com.summer.data.table.BaseColumn;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

/**
 * @author 345480567@qq.com
 */
public class TimestampColumn extends BaseColumn<Timestamp> {

    public TimestampColumn(String colName) {
        super(colName);
    }

    @Override
    public void fetchNotNullValue(ResultSet resultSet, Integer index) throws SQLException {
        value = getValue(resultSet, index);
    }

    public static Timestamp getValue(ResultSet resultSet, Integer index) throws SQLException {
        Timestamp value = resultSet.getTimestamp(index);
        return value;
    }

}
